InterestRate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 20
dl 0
loc 22
c 0
b 0
f 0
rs 10

2 Functions

Rating   Name   Duplication   Size   Complexity  
A getRate 0 3 1
A getId 0 3 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class InterestRate {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'integer', nullable: false, comment: 'Stored in base 100' })
9
  private rate: number;
10
11
  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
12
  private createdAt: Date;
13
14
  constructor(rate: number) {
15
    this.rate = rate;
16
  }
17
18
  public getId(): string {
19
    return this.id;
20
  }
21
22
  public getRate(): number {
23
    return this.rate;
24
  }
25
}
26